import { ref, watchEffect, reactive, computed } from 'vue'
import { useRoute } from 'vue-router';

export const use当前url = () => {
  const currentRoute = useRoute();
  if (!currentRoute) {
    return "非url情况？"
  }
  let url = currentRoute.path
  url = url.replace(/^\/layout/, '');
  return url;
};

export const use取插件id = () => {
  const currentRoute = useRoute();
  if (!currentRoute) {
    return "非url情况？"
  }
  let url = currentRoute.path
  url = url.replace(/^\/layout/, '');
  const sp = url.split('/')
  const 插件id = sp[1]
  const 组件id = sp[2]
  return { 插件id, 组件id };
};

